<?php
if(!empty($_GET['mid']))
{
$sqlShowMem="SELECT * FROM tbl_users where user_id=".$_GET['mid'];				 
$rstShowMem=mysql_query($sqlShowMem);
$numRows = mysql_num_rows($rstShowMem);
if($numRows>0) {				
while($rowShowMem = mysql_fetch_array($rstShowMem)) {				 
$_SESSION['user_id']=$rowShowMem['user_id'];
$_SESSION['user_name']=$rowShowMem['username'];
$_SESSION['user_type']=$rowShowMem['user_type'];
$_SESSION['user_status']=$rowShowMem['status'];
echo "<script language='javascript'>window.location='../index.php?mySwapen'</script>";
}
}
}
else
{
?>
<table width="100%"  border="1" cellspacing="0" class="container">
  <tr>
    <td width="469" height="25" class="tdHeader">View inventory</td>
  </tr>
  <tr>
    <td height="577" style="text-align:center">Invalid user ID</td>
	<br><br>
    </td>
    </tr>
</table>
<?php }
?>